{template 'common/header'}
<div class="main">
    <ul class="nav nav-tabs">
        <li class="active"><a href="{php echo $this->createWebUrl('activity');}">活动管理</a></li>
        <li><a href="{php echo $this->createWebUrl('addactivity');}">添加活动</a></li>
    </ul>
</div>       
<style>
.table td span{display:inline-block;margin-top:4px;}
.table td input{margin-bottom:0;}
</style>
<div class="clearfix">
    <div class="panel panel-default">
		<div class="panel-body table-responsive">
			<table class="table table-hover">
				<thead class="navbar-inner">
					<tr>
						<th style="width: 50px;">序号</th>
						<th>名称</th>
						<th>奖项</th>
						<th style="width: 100px;">创建时间</th>
				
						<th style="width: 200px; text-align: right;">操作</th>
					</tr>
				</thead>
				<tbody>
					{loop $list $item}
					<tr>
						<td>{$item['id']}</td>
						<td>{$item['title']}</td>
						<td>{$item['prize']}</td>
						<td>{php echo date('Y-m-d H:i:s',$item['addtime'])}</td>
                                                <td style="text-align: right;">
                                                    <a href="javascript:;" data-url="{$_W['siteroot']}app/{php echo $this->createMobileUrl('index', array('gid' => $item['id']))}" style="margin-right:0px;" class="color-default js-clip">复制链接</a>
							<a class="btn btn-success btn-sm"
							href="{php echo $this->createWebUrl('addactivity', array('id' => $item['id']))}"
							title="编辑"><i class="icon-edit"></i>编辑</a> 
							
							<a class="btn btn-default btn-sm" href="#"
							onclick="drop_confirm('确定要删除吗?','{php echo $this->createWebUrl('delact',array('id'=>$item['id']))}');"
							title="删除"><i class="icon-remove"></i>删除</a>
						</td>
					</tr>
					{/loop}
				</tbody>
			</table>
		</div>
		{$pager}
	</div>
</div>
<script type="text/javascript">

    require(['jquery', 'util'], function($, u){
     
    });
      function drop_confirm(msg, url){
                if(confirm(msg)){
                    window.location = url;
                }
        }
</script>
{template 'common/footer'}